-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add copy support for Wayland via wl-copy #11964
Conversation
🦋 Changeset detectedLatest commit: 6478752 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
@@ -86,8 +95,9 @@ async function copyToClipboard(text: string) { | |||
if (!shouldCopy) return; | |||
|
|||
try { | |||
execSync(command, { | |||
input: text.trim(), | |||
execSync(command.replaceAll('$0', text), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit worried with doing a plain replacement this way that could expose executing arbitrary commands, but it looks like we don't accept any user input that reaches here, so probably fine for now.
Changes
which
whenxclip
is not found in the pathastro info
copy support for Wayland users viawl-copy
Testing
Manually tested as tests for the cli don't cover
info
and we don't have the right test environment.Docs
No docs needed